import { lazy, FC, Suspense } from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import "./App.css";
import Navigation from "@/components/Navigation";

//懒加载
const Home = lazy(() => import("@/pages/home"));

const App: FC = () => {
  return (
    <BrowserRouter>
      <Suspense fallback={<div>loading....</div>}>
        <Routes>
          <Route path='/' element={<Navigation />}>
            <Route path='/' element={<Home />} />
            <Route path='/pins' element={<div className='px-5'>沸点-pages</div>}></Route>
            <Route path='/course' element={<div className='px-5'>课程-pages</div>}></Route>
            <Route path='/live' element={<div className='px-5'>直播-pages</div>}></Route>
          </Route>
        </Routes>
      </Suspense>
    </BrowserRouter>
  );
};
export default App;
